package org.dromara.system.job;

import com.aizuda.snailjob.client.job.core.annotation.JobExecutor;
import com.aizuda.snailjob.client.job.core.dto.JobArgs;
import com.aizuda.snailjob.client.model.ExecuteResult;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.dromara.system.domain.FirePump;
import org.dromara.system.mapper.DeviceMapper;
import org.dromara.system.mapper.FirePumpMapper;
import org.dromara.system.service.ISensorBackUpService;
import org.dromara.system.service.ISensorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@JobExecutor(name = "getDeviceListJob")
@Slf4j
@Component
@RequiredArgsConstructor(onConstructor_ = @Autowired)
public class getDeviceListJob {

    private final FirePumpMapper baseMapper;

    private final ISensorService sensorService;

    private final ISensorBackUpService sensorBackUpService;

    public ExecuteResult jobExecute(JobArgs jobArgs) {
        List<FirePump> firePumps = baseMapper.selectAllList();
//        for (FirePump firePump : firePumps) {
//
//        }
        return ExecuteResult.success("批量更新状态成功");
    }


}
